home *** CD-ROM | disk | FTP | other *** search
/ Software USA 4 #10 / Software USA Volume 4.10.iso / mac / Educational / HTML Vocabulary / HTML Vocabulary 2.0 / HTML Vocabulary 2.0.rsrc / TEXT_2300_Imagemaps.txt < prev    next >
Text File  |  1996-09-28  |  3KB  |  61 lines

  1.  
  2. About Imagemaps    
  3. Webmaps are also called imagemaps or clickable pictures. When the user clicks in the picture, (s)he is linked to different pages depending on where in the picture he clicked.
  4.  
  5. Webmaps consists of two files, a gif picture and the map definition. Definitions are traditionally not written in HTML, and must be supported by the server. Talk to the administrator to find out if the server supports maps. If it does, it can either be in CERN format, NCSA format, or both. CERN is the company which originally developed the WWW, while NCSA has created, for example, Mosaic. Maps like these uses a CGI-script (a program running on the server). 
  6.  
  7. Another type of imagemaps are calles Client Side imagemaps. These maps are written in HTML and does not need anything from the server. Instead the browser must support Client-Side imagemaps. These maps are the most popular ones today.
  8.  
  9. To define the map, you also need to know the exact dimensions of the map objects. An easier way to create maps is to use my program Mapper which works like a simple editor, where you place the objects just like you use drag icons on your desktop. Mapper can be downloaded from <http://www.calles.pp.se/nisseb/mapper.html>.
  10.  
  11.  
  12. The NCSA Format    
  13. In the NCSA format, all objects are separated with return characters. The list of objects starts with the objects ordered from the front to the back. It ends with the default url.
  14.  
  15. # text
  16. Defines a comment, not used by the browser.
  17.  
  18. rect url  x,y  x,y
  19. Defines a rectangle.
  20.  
  21. circle url  x,y  x,y
  22. Defines a circle. x,y is the center point and the edge point.
  23.  
  24. oval url  x,y  x,y
  25. Defines an oval. x,y x,y is the rectangle of the oval.
  26.  
  27. poly url  x,y  ... x,y
  28. Defines a polugon. Each 'x,y' specifies a point.
  29.  
  30. point url  x,y
  31. Defines a point at x,y.
  32.  
  33. default url
  34. Defines the default URL (locations where no other objects are defined. Must be placed after the objects.
  35.  
  36. The CERN Format    
  37. In the CERN format, all objects are separated with return characters. The list of objects starts with the default url, followed by the objects ordered from the back to the front.
  38.  
  39. # text
  40. Defines a comment, not used by the browser.
  41.  
  42. default url
  43. Defines the default URL (locations where no other objects are defined. Must be before the objects.
  44.  
  45. rect (x,y¬†) (x,y¬†) url
  46. Defines a rectangle.
  47.  
  48. circle (x,y¬†) rad url
  49. Defines a circle specified by it's center point and radius.
  50.  
  51. poly (x,y¬†)...(x,y¬†) url
  52. Defines a new polygon specified by a number of (x,y)'s.
  53.  
  54. The Client Side Format    
  55. The objects is stored in order from the back to the front. Maps are stored in the HEAD-section of the HTML-page.
  56.  
  57. <MAP NAME="text¬†">...</MAP>
  58. Start tag of the map definition. NAME is the anchor, used by the IMG tag to locate the map.
  59.  
  60. <AREA [SHAPE="rect|circ[le]|poly[gon]|default"] COORDS="x,y,x,y¬†" [NOHREF] [HREF="url¬†"] [ALT="text¬†"] [TARGET="text "]>
  61. Defines a map object. If SHAPE is not given, RECT will be used. DEFAULT can be used as a SHAPE to set the default URL of the map. HREF is the url to which a click in the object will point. NOHREF will make no action (a "dead" area). COORDS is the coordinates for the object. With the shape RECT, it's written as "left,top,right,bottom". With the shape CIRCLE, use "center_x,center_y,radius" and with the shape POLYGON, use "x1,y1,x2,y2...". ALT is the text to be showed if the browser can't display the picture, the same as ALT in the IMG-tag.